/*
 * Copyright (C) 2017 Pingan, Inc. All Rights Reserved.
 */

package com.pingan.haofang.searchcloud.es.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * ES properties
 *
 * @author zhangbi617
 * @date 2017-07-04
 */
@ConfigurationProperties(prefix = "searchcloud.elasticsearch")
public class ElasticSearchProperties {

    /**
     * es地址，多个使用逗号分隔,例如192.168.0.1:9300,192.168.0.2:9300
     */
    private String addresses;

    /**
     * elasticsearch集群名称
     */
    private String clusterName = "elasticsearch";

    /**
     * sniff
     */
    private boolean clientTransportSniff = false;

    public String getAddresses() {
        return addresses;
    }

    public void setAddresses(String addresses) {
        this.addresses = addresses;
    }

    public String getClusterName() {
        return clusterName;
    }

    public void setClusterName(String clusterName) {
        this.clusterName = clusterName;
    }

    public boolean isClientTransportSniff() {
        return clientTransportSniff;
    }

    public void setClientTransportSniff(boolean clientTransportSniff) {
        this.clientTransportSniff = clientTransportSniff;
    }

    @Override
    public String toString() {
        return "ElasticSearchProperties{" +
                "addresses='" + addresses + '\'' +
                ", clusterName='" + clusterName + '\'' +
                ", clientTransportSniff=" + clientTransportSniff +
                '}';
    }
}
